﻿<UserControl x:Class="Win7RovMobileApp.TimeCounter"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    Width="40"  Height="60">
    <UserControl.Resources>
        <Style x:Key="Grid" TargetType="ContentControl">
            <Setter Property="FontSize"  Value="24"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="Template" >
                <Setter.Value>
                    <ControlTemplate>
                        <Border Width="40" Height="60">
                            <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>

        </Style>
    </UserControl.Resources>


    <Canvas Width="40" Height="60">
        <Canvas.Clip>
            <RectangleGeometry Rect="0,0,40,60"/>
        </Canvas.Clip>
        <ItemsControl x:Name="MyCounter">
            <ItemsControl.RenderTransform>
                <TranslateTransform/>
            </ItemsControl.RenderTransform>
            <ContentControl x:Name="NewValue"  Content="0"  Style="{StaticResource Grid}" />
            <ContentControl x:Name="OldValue"  Content="0"  Style="{StaticResource Grid}" />
        </ItemsControl>
    </Canvas>
</UserControl>
